package com.ibm.psbc.cloud;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;

@SpringBootApplication
//@EnableFeignClients
public class DubboNacosConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(DubboNacosConsumerApplication.class, args);
    }

	@Bean
	@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE, proxyMode = ScopedProxyMode.INTERFACES)
	public DubboReferenceBeanFactory<UserService> getUserService() {
		return new DubboReferenceBeanFactory<>(UserService.class);
	}

}